<?php

class TaskAssignment {

    private $mId;
    private $mTask;
    private $mUser;
    private $mIsLoaded;
    
    public function setId($value){
        $this->mId = $value;
    }
    
    public function getId(){
        return $this->mId;
    }

    public function setTask($value){
        $this->mTask = $value;
    }

    public function getTask(){
        if (($this->mTask != null) && (!$this->mTask->IsLoaded())) {
           $TaskDao = new TaskDao();
           $this->mTask = $TaskDao->getObject($this->mTask->getId());
           if ($this->mTask != null) $this->mTask->setIsLoaded(true);
           }
        return $this->mTask;
    }

    public function setUser($value){
        $this->mUser = $value;
    }

    public function getUser(){
         if (($this->mUser != null) && (!$this->mUser->IsLoaded())) {
            $UserDao = new UserDao();
            $this->mUser = $UserDao->getObject($this->mUser->getId());
            if ($this->mUser != null) $this->mUser->setIsLoaded(true);
            }
        return $this->mUser;
    }
    
    public function IsLoaded() {
        return $this->mIsLoaded;
    }

    public function setIsLoaded($value) {
        $this->mIsLoaded = $value;
    }
}
